package com.woniuxy03;

/**
 * @author 作者
 * @create 2025-10-30 16:31
 */
public class Cat extends Animal{

    private int health;

    public Cat() {
    }

    //创建一个子类cat，全参构造器三个属性
    // name,age继承自父类:使用 super(name, age)调用父类的构造方法
    //health是自己特有的属性,自己赋值
    public Cat(String name, int age, int health) {
        super(name, age);
//        setName(name);
//        setAge(age);
        this.health = health;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }


}
